<!DOCTYPE html>



  


<html class="theme-next gemini use-motion" lang="zh-Hans">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
<meta name="theme-color" content="#222">









<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
















  
  
  <link href="/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css" />







<link href="/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css" />

<link href="/css/main.css?v=5.1.4" rel="stylesheet" type="text/css" />


  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png?v=5.1.4">


  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png?v=5.1.4">


  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png?v=5.1.4">


  <link rel="mask-icon" href="/images/logo.svg?v=5.1.4" color="#222">





  <meta name="keywords" content="sql," />










<meta name="description" content="内连接什么是内连接？内连接也叫连接，是最早的一种连接。还可以被称为普通连接或者自然连接，组合两张或多张表，并且通过两张表关联关系来连接它们（关联关系可以联想为两表的交集）。 代码实例：（course 课程表、student 学生表 、sc 学生选课表）所查询信息涉及两个表，需要一个join 12345678910--查询选修数据库的学生学号select sno from course,sc whe">
<meta property="og:type" content="article">
<meta property="og:title" content="sql 内连接、外连接、嵌套查询（稍微带一点聚集函数）">
<meta property="og:url" content="http://yoursite.com/2020/05/26/sql%20%E5%86%85%E8%BF%9E%E6%8E%A5%E3%80%81%E5%A4%96%E8%BF%9E%E6%8E%A5%E3%80%81%E5%B5%8C%E5%A5%97%E6%9F%A5%E8%AF%A2%EF%BC%88%E7%A8%8D%E5%BE%AE%E5%B8%A6%E4%B8%80%E7%82%B9%E8%81%9A%E9%9B%86%E5%87%BD%E6%95%B0%EF%BC%89/index.html">
<meta property="og:site_name" content="LuckyJianNing">
<meta property="og:description" content="内连接什么是内连接？内连接也叫连接，是最早的一种连接。还可以被称为普通连接或者自然连接，组合两张或多张表，并且通过两张表关联关系来连接它们（关联关系可以联想为两表的交集）。 代码实例：（course 课程表、student 学生表 、sc 学生选课表）所查询信息涉及两个表，需要一个join 12345678910--查询选修数据库的学生学号select sno from course,sc whe">
<meta property="og:image" content="https://img-blog.csdnimg.cn/2020052616490670.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQ1NjU3OTg2,size_16,color_FFFFFF,t_70">
<meta property="article:published_time" content="2020-05-26T08:40:04.000Z">
<meta property="article:modified_time" content="2020-06-29T10:41:13.878Z">
<meta property="article:author" content="Force-9">
<meta property="article:tag" content="sql">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://img-blog.csdnimg.cn/2020052616490670.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQ1NjU3OTg2,size_16,color_FFFFFF,t_70">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/',
    scheme: 'Gemini',
    version: '5.1.4',
    sidebar: {"position":"left","display":"post","offset":12,"b2t":false,"scrollpercent":false,"onmobile":false},
    fancybox: true,
    tabs: true,
    motion: {"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},
    duoshuo: {
      userId: '0',
      author: '博主'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="http://yoursite.com/2020/05/26/sql 内连接、外连接、嵌套查询（稍微带一点聚集函数）/"/>





  <title>sql 内连接、外连接、嵌套查询（稍微带一点聚集函数） | LuckyJianNing</title>
  








<meta name="generator" content="Hexo 4.2.0"></head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">

  
  
    
  

  <div class="container sidebar-position-left page-post-detail">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/"  class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">LuckyJianNing</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
      
        <p class="site-subtitle"></p>
      
  </div>

  <div class="site-nav-toggle">
    <button>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br />
            
            首页
          </a>
        </li>
      
        
        <li class="menu-item menu-item-about">
          <a href="/about/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-user"></i> <br />
            
            关于
          </a>
        </li>
      
        
        <li class="menu-item menu-item-tags">
          <a href="/tags/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-tags"></i> <br />
            
            标签
          </a>
        </li>
      
        
        <li class="menu-item menu-item-categories">
          <a href="/categories/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-th"></i> <br />
            
            分类
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/archives/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-question-circle"></i> <br />
            
            归档
          </a>
        </li>
      

      
    </ul>
  

  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://yoursite.com/2020/05/26/sql%20%E5%86%85%E8%BF%9E%E6%8E%A5%E3%80%81%E5%A4%96%E8%BF%9E%E6%8E%A5%E3%80%81%E5%B5%8C%E5%A5%97%E6%9F%A5%E8%AF%A2%EF%BC%88%E7%A8%8D%E5%BE%AE%E5%B8%A6%E4%B8%80%E7%82%B9%E8%81%9A%E9%9B%86%E5%87%BD%E6%95%B0%EF%BC%89/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="Force-9">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/images/avator.png">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="LuckyJianNing">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">sql 内连接、外连接、嵌套查询（稍微带一点聚集函数）</h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2020-05-26T16:40:04+08:00">
                2020-05-26
              </time>
            

            

            
          </span>

          
            <span class="post-category" >
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/%E7%AC%94%E8%AE%B0/" itemprop="url" rel="index">
                    <span itemprop="name">笔记</span>
                  </a>
                </span>

                
                
              
            </span>
          

          

          
          

          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      
        <div class="post-gallery" itemscope itemtype="http://schema.org/ImageGallery">
          
          
            <div class="post-gallery-row">
              <a class="post-gallery-img fancybox"
                 href="https://img-blog.csdnimg.cn/2020052616490670.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQ1NjU3OTg2,size_16,color_FFFFFF,t_70" rel="gallery_ckc7edijr0000swu9b3fyc7zm"
                 itemscope itemtype="http://schema.org/ImageObject" itemprop="url">
                <img src="https://img-blog.csdnimg.cn/2020052616490670.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQ1NjU3OTg2,size_16,color_FFFFFF,t_70" itemprop="contentUrl"/>
              </a>
            
          

          
          </div>
        </div>
      

      
        <h2 id="内连接"><a href="#内连接" class="headerlink" title="内连接"></a>内连接</h2><h3 id="什么是内连接？"><a href="#什么是内连接？" class="headerlink" title="什么是内连接？"></a>什么是内连接？</h3><p>内连接也叫连接，是最早的一种连接。还可以被称为普通连接或者自然连接，组合两张或多张表，并且通过两张表关联关系来连接它们（关联关系可以联想为两表的交集）。</p>
<p>代码实例：（course 课程表、student 学生表 、sc 学生选课表）<br>所查询信息涉及两个表，需要一个join</p>
<figure class="highlight sql"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">--查询选修数据库的学生学号</span></span><br><span class="line"><span class="keyword">select</span> sno <span class="keyword">from</span> course,sc <span class="keyword">where</span> cname=<span class="string">'数据库'</span> <span class="keyword">and</span> course.cno=sc.cno</span><br><span class="line"><span class="keyword">select</span> sno <span class="keyword">from</span> course <span class="keyword">inner</span> <span class="keyword">join</span> sc </span><br><span class="line"><span class="keyword">on</span> course.cno=sc.cno //sc表和course表之间相互联系的列名</span><br><span class="line"><span class="keyword">where</span> cname=<span class="string">'数据库'</span></span><br><span class="line">//<span class="keyword">inner</span> <span class="keyword">join</span> 中的<span class="keyword">inner</span>可以省略</span><br><span class="line"><span class="comment">--查询201215123所选修的课程名称</span></span><br><span class="line"><span class="keyword">select</span> cname <span class="keyword">from</span> course <span class="keyword">join</span> sc </span><br><span class="line"><span class="keyword">on</span> course.cno = sc.cno</span><br><span class="line"><span class="keyword">where</span> sno=<span class="string">'201215123'</span></span><br></pre></td></tr></table></figure>
<p>所查询信息涉及三个表，需要两个join</p>
<figure class="highlight sql"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">--查询选修了数据库的学生的姓名</span></span><br><span class="line"><span class="keyword">select</span> sname <span class="keyword">from</span> student <span class="keyword">join</span> sc <span class="keyword">join</span> course</span><br><span class="line"><span class="keyword">on</span> sc.cno=course.cno//sc表和course表之间相互联系的列名</span><br><span class="line"><span class="keyword">on</span> student.sno=sc.sno//sc表和student表之间相互联系的列名</span><br><span class="line"><span class="keyword">where</span> cname=<span class="string">'数据库'</span></span><br><span class="line"><span class="comment">--查询张三选修的课程名称</span></span><br><span class="line"><span class="keyword">select</span> cname <span class="keyword">from</span> course <span class="keyword">join</span> sc <span class="keyword">join</span> student </span><br><span class="line"><span class="keyword">on</span> sc.sno=student.sno</span><br><span class="line"><span class="keyword">on</span> sc.cno=course.cno</span><br><span class="line"><span class="keyword">where</span> sname=<span class="string">'张三'</span></span><br></pre></td></tr></table></figure>
<h2 id="外连接"><a href="#外连接" class="headerlink" title="外连接"></a>外连接</h2><h3 id="什么是外连接？"><a href="#什么是外连接？" class="headerlink" title="什么是外连接？"></a>什么是外连接？</h3><p>外连接分为左外连接和右外连接。<br>左外连接：选取左边的所有行，若右边存在没有对应匹配的相关行，则将上面所指的这些行也选取进来，对应左边表的列名全为空值。<br>右外连接：选取右边的所有行，若左边存在没有对应匹配的相关行，则将上面所指的这些行也选取进来，对应右边表的列名全为空值。<br>外连接查询，在最后选取出来的新表中进行where查询。<br>代码实例：</p>
<figure class="highlight sql"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">--左外连接</span></span><br><span class="line"><span class="keyword">select</span> student.*, sc.cno,sc.grade </span><br><span class="line">//选取student的所有行，再查看sc中是否存在没有对应匹配的行，</span><br><span class="line">//若存在，将其选取出来，student表中的列名属性为<span class="literal">NULL</span>值</span><br><span class="line"><span class="keyword">from</span> student <span class="keyword">left</span> <span class="keyword">join</span> sc</span><br><span class="line"><span class="keyword">on</span> student.sno=sc.sno//两表相互联系的属性</span><br><span class="line"><span class="comment">--右外连接</span></span><br><span class="line"><span class="keyword">select</span> sc.sno,sc.grade,course.*</span><br><span class="line">//选取course中的所有行，sc中没有互相匹配对应的行也选取到其中（同上）</span><br><span class="line"><span class="keyword">from</span> sc <span class="keyword">right</span> <span class="keyword">join</span> course</span><br><span class="line"><span class="keyword">on</span> sc.cno=course.cno</span><br></pre></td></tr></table></figure>
<h2 id="嵌套查询"><a href="#嵌套查询" class="headerlink" title="嵌套查询"></a>嵌套查询</h2><h3 id="什么是嵌套查询？"><a href="#什么是嵌套查询？" class="headerlink" title="什么是嵌套查询？"></a>什么是嵌套查询？</h3><p>嵌套查询的意思是，一个查询语句(select-from-where)查询语句块可以嵌套在另外一个查询块的where子句中，称为嵌套查询。其中外层查询也称为父查询，主查询。内层查询也称子查询，从查询。引用“远方有你，伴余生”<a href="https://www.cnblogs.com/glassysky/p/11559082.html" target="_blank" rel="noopener">blog点这里</a>传送点</p>
<p>两个表相关联</p>
<figure class="highlight sql"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">--查询张飞所选修的课程号</span></span><br><span class="line"><span class="keyword">select</span> cno <span class="keyword">from</span> sc</span><br><span class="line">//再根据所选的学号，从sc中来选择课程号**这是第二步**</span><br><span class="line"><span class="keyword">where</span> sno <span class="keyword">in</span></span><br><span class="line">//在student表中查找名字为张飞的人的学号（学号为两表的连接属性）**这是第一步**</span><br><span class="line">(<span class="keyword">select</span> sno <span class="keyword">from</span> student <span class="keyword">where</span> sname=<span class="string">'张飞'</span>)</span><br><span class="line"></span><br><span class="line"><span class="comment">--查询选修数据库这门课程的学生的学号</span></span><br><span class="line"><span class="keyword">select</span> sno <span class="keyword">from</span> sc <span class="keyword">where</span> cno <span class="keyword">in</span></span><br><span class="line">(<span class="keyword">select</span> cno <span class="keyword">from</span> course <span class="keyword">where</span> cname=<span class="string">'数据库'</span>)</span><br></pre></td></tr></table></figure>
<p>三个表相关联</p>
<figure class="highlight sql"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">--查询201215123学生所选修的课程的总学分</span></span><br><span class="line"><span class="keyword">select</span> <span class="keyword">sum</span>(ccredit) <span class="keyword">from</span> course <span class="keyword">where</span> cno <span class="keyword">in</span> </span><br><span class="line">(<span class="keyword">select</span> cno <span class="keyword">from</span> sc <span class="keyword">where</span> sno=<span class="string">'201215123'</span>)</span><br><span class="line"><span class="comment">--查询选修1号课程的学生的平均年龄</span></span><br><span class="line"><span class="keyword">select</span> <span class="keyword">AVG</span>(sage) <span class="keyword">as</span> 平均年龄 <span class="keyword">from</span> student <span class="keyword">where</span> sno <span class="keyword">in</span></span><br><span class="line">(<span class="keyword">select</span> sno <span class="keyword">from</span> sc <span class="keyword">where</span> cno=<span class="string">'1'</span>)</span><br></pre></td></tr></table></figure>
<h2 id="聚集函数"><a href="#聚集函数" class="headerlink" title="聚集函数"></a>聚集函数</h2><p>max(列名)  //求列中最大值<br>min(列名)  //求列中最小值<br>sum(列名) //求列中数据的总和<br>avg(列名) //求列中数据的平均值<br>count(列名) //求总行数</p>

      
    </div>
    
    
    

<div>
      
        ﻿
<div class="my_post_copyright">
  <script src="//cdn.bootcss.com/clipboard.js/1.5.10/clipboard.min.js"></script>
  
  <!-- JS库 sweetalert 可修改路径 -->
  <script src="https://cdn.bootcss.com/jquery/2.0.0/jquery.min.js"></script>
  <script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
  <p><span>本文标题:</span><a href="/2020/05/26/sql%20%E5%86%85%E8%BF%9E%E6%8E%A5%E3%80%81%E5%A4%96%E8%BF%9E%E6%8E%A5%E3%80%81%E5%B5%8C%E5%A5%97%E6%9F%A5%E8%AF%A2%EF%BC%88%E7%A8%8D%E5%BE%AE%E5%B8%A6%E4%B8%80%E7%82%B9%E8%81%9A%E9%9B%86%E5%87%BD%E6%95%B0%EF%BC%89/">sql 内连接、外连接、嵌套查询（稍微带一点聚集函数）</a></p>
  <p><span>文章作者:</span><a href="/" title="访问 Force-9 的个人博客">Force-9</a></p>
  <p><span>发布时间:</span>2020年05月26日 - 16:05</p>
  <p><span>最后更新:</span>2020年06月29日 - 18:06</p>
  <p><span>原始链接:</span><a href="/2020/05/26/sql%20%E5%86%85%E8%BF%9E%E6%8E%A5%E3%80%81%E5%A4%96%E8%BF%9E%E6%8E%A5%E3%80%81%E5%B5%8C%E5%A5%97%E6%9F%A5%E8%AF%A2%EF%BC%88%E7%A8%8D%E5%BE%AE%E5%B8%A6%E4%B8%80%E7%82%B9%E8%81%9A%E9%9B%86%E5%87%BD%E6%95%B0%EF%BC%89/" title="sql 内连接、外连接、嵌套查询（稍微带一点聚集函数）">http://yoursite.com/2020/05/26/sql%20%E5%86%85%E8%BF%9E%E6%8E%A5%E3%80%81%E5%A4%96%E8%BF%9E%E6%8E%A5%E3%80%81%E5%B5%8C%E5%A5%97%E6%9F%A5%E8%AF%A2%EF%BC%88%E7%A8%8D%E5%BE%AE%E5%B8%A6%E4%B8%80%E7%82%B9%E8%81%9A%E9%9B%86%E5%87%BD%E6%95%B0%EF%BC%89/</a>
    <span class="copy-path"  title="点击复制文章链接"><i class="fa fa-clipboard" data-clipboard-text="http://yoursite.com/2020/05/26/sql%20%E5%86%85%E8%BF%9E%E6%8E%A5%E3%80%81%E5%A4%96%E8%BF%9E%E6%8E%A5%E3%80%81%E5%B5%8C%E5%A5%97%E6%9F%A5%E8%AF%A2%EF%BC%88%E7%A8%8D%E5%BE%AE%E5%B8%A6%E4%B8%80%E7%82%B9%E8%81%9A%E9%9B%86%E5%87%BD%E6%95%B0%EF%BC%89/"  aria-label="复制成功！"></i></span>
  </p>
  <p><span>许可协议:</span><i class="fa fa-creative-commons"></i> <a rel="license" href="https://creativecommons.org/licenses/by-nc-nd/4.0/" target="_blank" title="Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0)">署名-非商业性使用-禁止演绎 4.0 国际</a> 转载请保留原文链接及作者。</p>  
</div>
<script> 
    var clipboard = new Clipboard('.fa-clipboard');
	  $(".fa-clipboard").click(function(){
      clipboard.on('success', function(){
        swal({   
          title: "",   
          text: '复制成功',
          icon: "success", 
          showConfirmButton: true
          });
	    });
    });  
</script>


      
</div>

    

    

    

    <footer class="post-footer">
      
        <div class="post-tags">
          
            <a href="/tags/sql/" rel="tag"># sql</a>
          
        </div>
      

      
      
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/2020/05/21/sql%20sever2019%E5%9F%BA%E7%A1%80%E5%91%BD%E4%BB%A4/" rel="next" title="sql sever2019基础命令">
                <i class="fa fa-chevron-left"></i> sql sever2019基础命令
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/2020/06/01/%E6%80%9D%E7%A7%91%E5%8A%A8%E6%80%81%E8%B7%AF%E7%94%B1RIP%E5%8D%8F%E8%AE%AE%E9%85%8D%E7%BD%AE/" rel="prev" title="思科动态路由RIP协议配置简单命令">
                思科动态路由RIP协议配置简单命令 <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </div>
  
  
  
  </article>



    <div class="post-spread">
      
        <!-- JiaThis Button BEGIN -->
<div class="jiathis_style">
<span class="jiathis_txt">分享到：</span>
<a class="jiathis_button_fav">收藏夹</a>
<a class="jiathis_button_copy">复制网址</a>
<a class="jiathis_button_email">邮件</a>
<a class="jiathis_button_weixin">微信</a>
<a class="jiathis_button_qzone">QQ空间</a>
<a class="jiathis_button_tqq">腾讯微博</a>
<a class="jiathis_button_douban">豆瓣</a>
<a class="jiathis_button_share">一键分享</a>

<a href="http://www.jiathis.com/share?uid=2140465" class="jiathis jiathis_txt jiathis_separator jtico jtico_jiathis" target="_blank">更多</a>
<a class="jiathis_counter_style"></a>
</div>
<script type="text/javascript" >
var jiathis_config={
  data_track_clickback:true,
  summary:"",
  shortUrl:false,
  hideMore:false
}
</script>
<script type="text/javascript" src="http://v3.jiathis.com/code/jia.js?uid=" charset="utf-8"></script>
<!-- JiaThis Button END -->
      
    </div>
  </div>


          </div>
          


          

        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap">
            文章目录
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview-wrap">
            站点概览
          </li>
        </ul>
      

      <section class="site-overview-wrap sidebar-panel">
        <div class="site-overview">
          <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
            
              <img class="site-author-image" itemprop="image"
                src="/images/avator.png"
                alt="Force-9" />
            
              <p class="site-author-name" itemprop="name">Force-9</p>
              <p class="site-description motion-element" itemprop="description">世间万物，唯有美食与爱不可辜负。</p>
          </div>

          <nav class="site-state motion-element">

            
              <div class="site-state-item site-state-posts">
              
                <a href="/archives/">
              
                  <span class="site-state-item-count">11</span>
                  <span class="site-state-item-name">日志</span>
                </a>
              </div>
            

            
              
              
              <div class="site-state-item site-state-categories">
                <a href="/categories/index.html">
                  <span class="site-state-item-count">2</span>
                  <span class="site-state-item-name">分类</span>
                </a>
              </div>
            

            
              
              
              <div class="site-state-item site-state-tags">
                <a href="/tags/index.html">
                  <span class="site-state-item-count">5</span>
                  <span class="site-state-item-name">标签</span>
                </a>
              </div>
            

          </nav>

          

          
            <div class="links-of-author motion-element">
                
                  <span class="links-of-author-item">
                    <a href="https://github.com/LuckyJianNing" target="_blank" title="GitHub">
                      
                        <i class="fa fa-fw fa-github"></i>GitHub</a>
                  </span>
                
                  <span class="links-of-author-item">
                    <a href="mailto:1134285596@qq.com" target="_blank" title="E-Mail">
                      
                        <i class="fa fa-fw fa-envelope-square"></i>E-Mail</a>
                  </span>
                
                  <span class="links-of-author-item">
                    <a href="https://twitter.com" target="_blank" title="Twitter">
                      
                        <i class="fa fa-fw fa-twitter"></i>Twitter</a>
                  </span>
                
                  <span class="links-of-author-item">
                    <a href="1134285596" target="_blank" title="QQ">
                      
                        <i class="fa fa-fw fa-qq"></i>QQ</a>
                  </span>
                
                  <span class="links-of-author-item">
                    <a href="https://me.csdn.net/qq_45657986" target="_blank" title="CSDN">
                      
                        <i class="fa fa-fw fa-book"></i>CSDN</a>
                  </span>
                
            </div>
          

          
          

          
          

          

        </div>
      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-2"><a class="nav-link" href="#内连接"><span class="nav-number">1.</span> <span class="nav-text">内连接</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#什么是内连接？"><span class="nav-number">1.1.</span> <span class="nav-text">什么是内连接？</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#外连接"><span class="nav-number">2.</span> <span class="nav-text">外连接</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#什么是外连接？"><span class="nav-number">2.1.</span> <span class="nav-text">什么是外连接？</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#嵌套查询"><span class="nav-number">3.</span> <span class="nav-text">嵌套查询</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#什么是嵌套查询？"><span class="nav-number">3.1.</span> <span class="nav-text">什么是嵌套查询？</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#聚集函数"><span class="nav-number">4.</span> <span class="nav-text">聚集函数</span></a></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        ﻿<script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
<div class="powered-by">
<i class="fa fa-user-md"></i><span id="busuanzi_container_site_uv">
  本站访客数:<span id="busuanzi_value_site_uv"></span>
</span>
</div>

<div class="copyright">&copy; <span itemprop="copyrightYear">2020</span>
  <span class="with-love">
    <i class="fa fa-user"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">Force-9</span>

  
</div>

<!--
  <div class="powered-by">由 <a class="theme-link" target="_blank" href="https://hexo.io">Hexo</a> 强力驱动</div>



  <span class="post-meta-divider">|</span>



  <div class="theme-info">主题 &mdash; <a class="theme-link" target="_blank" href="https://github.com/iissnan/hexo-theme-next">NexT.Gemini</a> v5.1.4</div>
-->



<div class="theme-info">
  <div class="powered-by"></div>
  <span class="post-count">博客全站共4.7k字</span>
</div>

        







        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
      </div>
    

    

  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  


  











  
  
    <script type="text/javascript" src="/lib/jquery/index.js?v=2.1.3"></script>
  

  
  
    <script type="text/javascript" src="/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>
  

  
  
    <script type="text/javascript" src="/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>
  

  
  
    <script type="text/javascript" src="/lib/canvas-nest/canvas-nest.min.js"></script>
  


  


  <script type="text/javascript" src="/js/src/utils.js?v=5.1.4"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=5.1.4"></script>



  
  


  <script type="text/javascript" src="/js/src/affix.js?v=5.1.4"></script>

  <script type="text/javascript" src="/js/src/schemes/pisces.js?v=5.1.4"></script>



  
  <script type="text/javascript" src="/js/src/scrollspy.js?v=5.1.4"></script>
<script type="text/javascript" src="/js/src/post-details.js?v=5.1.4"></script>



  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=5.1.4"></script>



  


  




	





  





  












  





  

  

  

  
  

  

  

  

</body>
</html>
